<%-- <%@page import="com.sun.xml.internal.bind.v2.runtime.output.Pcdata"%>
<%@page import="org.eclipse.jdt.internal.compiler.flow.InsideSubRoutineFlowContext"%>
<!DOCTYPE html>

<%@page import="edu.uta.tsrh.db.*"
        import="edu.uta.tsrh.model.PhoneConvRecord"%> 

<%    
                                                
            String check = null;
            String callerName = request.getParameter( "caller" );
            String subject = request.getParameter( "ph_subject" );
            String body =  request.getParameter( "ph_body" );
            String pcID = (String) request.getParameter("nVal");
            MySQLDBServices dbservices = new MySQLDBServices();
            MySQLDBServices arch = new MySQLDBServices();
            
            if(request.getParameter( "edit" ) != null)                
            {
                
                String result = dbservices.updatePhoneConversation(pcID, callerName,subject,body);
                check = "Edits Saved.";
            }
            if(request.getParameter( "delete" ) != null)
            {
               
                dbservices.archivePhoneRecord(dbservices.getPhoneConversation(Integer.parseInt(pcID)));
                dbservices.deletePhoneRecord(Integer.parseInt(pcID));                 
                check = "Note Deleted";
            }
            
           

%>
<html lang="en">
    <head>
	<title>TSRHC - Phone Management</title>
	<meta charset="utf-8">
	<meta name="description" content="Place your description here">
	<meta name="keywords" content="put, your, keyword, here">
	<meta name="author" content="Templates.com - website templates provider">
	<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
	<link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
	<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
	<script type="text/javascript" src="/TSRH/js/head.min.js"></script>
	
	<script type="text/javascript">
	    head.js("/TSRH/js/maxheight.js",
		    "/TSRH/js/jquery-1.4.2.min.js",
		    "/TSRH/js/cufon-yui.js",
		    "/TSRH/js/cufon-replace.js",
		    "/TSRH/js/Myriad_Pro_400.font.js",
		    "/TSRH/js/script.js",
		    "/TSRH/js/cal.js",
		    
		    function() {
			// Do nothing (for now)
		    });
	</script>

	<SCRIPT LANGUAGE=JavaScript>
	    /* intImage = 2;
	function swapImage() {
	switch (intImage) {
	 case 1:
	   IMG1.src = "index.jsp"
	   intImage = 2
	   return(false);
	case 2:
	   IMG1.src = "Displayalert.jsp"
	   intImage = 1
	   return(false);
	 }
	} */
	</SCRIPT>
	<!--[if lt IE 7]>
		<link rel="stylesheet" href="css/ie/ie6.css" type="text/css" media="screen">
		<script type="text/javascript" src="js/ie_png.js"></script>
		<script type="text/javascript">
			ie_png.fix('.png, #slogan, header nav ul li a, .icon img, .link1, .link1 span');
		</script>
	<![endif]-->
	<!--[if lt IE 9]>
		<script type="text/javascript" src="js/html5.js"></script>
	<![endif]-->
    </head>
         <%
     if(session.getAttribute("user") == null){
         response.sendRedirect("/TSRH/index.jsp");
     }
    %>
    <body id="page1" onLoad="new ElementMaxHeight();">
	<div class="wrap">	    
	    <!-- header -->
	    <%@ include file="headers.jsp" %>
            
	    <!-- content -->
	    <section id="content">
		<div class="container"><div class="ic">More Website Templates at TemplateMonster.com!</div>
		    <div class="inside">
			<div class="wrapper indent">
			    <article class="col-1">
                                
				<h2>Success! <%=check%></h2>				
                                
				</form>
			    </article>
			</div>
			
		    </div>
		</div>
	    </section>
	</div>
	<!-- footer -->
	<%@ include file="footers.jsp" %>
        
	<script type="text/javascript">Cufon.now();</script>
    </body>
</html>

-%>